package com.cabal.clear.service.impl;

import com.cabal.clear.dao.ClearSomeDataMapper;
import com.cabal.clear.service.ClearSomeDataService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Slf4j
@Service
public class ClearSomeDataServiceImpl implements ClearSomeDataService {

    @Resource
    private ClearSomeDataMapper clearSomeDataMapper;

    @Override
    public void clearSomeData() {
        // 1、删除接收邮件
        int receiveCount = clearSomeDataMapper.clearMailReceiveData();
        log.info("删除3天前接收邮件数据记录数>>>>" + receiveCount);

        // 2、删除发送邮件
        int sendCount = clearSomeDataMapper.clearMailSendData();
        log.info("删除3天前发送邮件数据记录数>>>>" + sendCount);

        // 3、删除元宝背包未领取福利卡发送记录
        int cashItemCount = clearSomeDataMapper.clearCashItemData();
        log.info("删除7天前元宝背包福利卡数据记录数>>>>" + cashItemCount);

        // 4、删除神器过期记录
        //int artifactCount = clearSomeDataMapper.updateArtifactCashItemData();
        //log.info("更新3天前元宝背包神器领取状态数据记录数>>>>" + artifactCount);
    }
}
